#include "dkglController.h"

namespace DKGL
{

using namespace std;

void MouseBasic::appOnMove(int x, int y)
{
	mCurrentX = x; mCurrentY = y;
	mOffSetX = x - mPrevX; mOffSetY = y - mPrevY;
	mPrevX = x; mPrevY = y; 
}

void MouseBasic::appOnLeftPress(int x, int y)
{
	mCurrentX = x;  mCurrentY = y;
	mPrevX = x; mPrevY = y;
	mOriX = x; mOriY = y;
	mOffSetX = mOffSetY = 0;
	mLMBDown = true;
}

void MouseBasic::appOnLeftRelease(int x, int y)
{
	mCurrentX = x;  mCurrentY = y;
	mLMBDown = false;
}

void MouseBasic::appOnMiddlePress(int x, int y)
{
	mCurrentX = x;  mCurrentY = y;
	mPrevX = x; mPrevY = y;
	mOriX = x; mOriY = y;
	mOffSetX = mOffSetY = 0;
	mMMBDown = true;
}

void MouseBasic::appOnMiddleRelease(int x, int y)
{
	mCurrentX = x;  mCurrentY = y;
	mMMBDown = false;
}

void MouseBasic::appOnRightPress(int x, int y)
{
	mCurrentX = x;  mCurrentY = y;
	mPrevX = x; mPrevY = y;
	mOriX = x; mOriY = y;
	mOffSetX = mOffSetY = 0;
	mRMBDown = true;
}

void MouseBasic::appOnRightRelease(int x, int y)
{
	mCurrentX = x;  mCurrentY = y;
	mRMBDown = false;
}

MouseFP::MouseFP()
{
	onlyMove = NULL;
	leftPress = NULL;
	leftDrag = NULL;
	leftRelease = NULL;

	middlePress = NULL;
	middleDrag = NULL;
	middleRelease = NULL;

	rightPress = NULL;
	rightDrag = NULL;
	rightRelease = NULL;
}
	

}//namespace